home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
ebl405.zip
/
BATDEMO.BAT
< prev
next >
Wrap
DOS Batch File
|
1990-03-05
|
17KB
|
519 lines
bat * Loading DEMO .....
* Written by F.Canova 10/5/83 through 01/25/90
* (c) Copyright 1983-1990 by Seaware Corp. all rights reserved.
* This batch file REQUIRES EBL PLUS for proper execution!
********************* NOTE! NOTE! NOTE! NOTE! ********************
%D = 'RAM' |* <-----Change 'RAM' to 'BIOS' if PC isn't 100% IBM Compatible!
goto -start
* For more information or to receive your own copy of EBL PLUS write to:
* Seaware Corp.
* P.O. Box 1656
* Delray Beach, FL 33444
*---- FEATURES OF THE LANGUAGE USED WITHIN THIS DEMO ARE: ----------------
* Standard DOS commands can be intermixed freely with BAT commands.
* Up to 255 chars are allowed for labels, contents of vars, and literals
* 10 variables are provided to be passed to/from DOS. They're %0 to %9.
* 15 variables are provided for EBL PLUS┐ user use only. They're %A to %O.
* The variable %R is a return code that any routine can set at [0:04FE]
* BEGTYPE command can have screen attributes via the COLORCHAR command,
* or the '\hex' format.
* BEGSTACK command can have timing attributes via the KEY(PAUSE) or
* the alternative '\hex' format.
* Spaces are not needed to delimit operators.
* Non-spaces will concatenate variables and literals.
* EXIST() and DIR() set a return code based on state of a file's existence.
** Now actually do the bouncing bar menu **
-End1 type " Exit to DOS " | If %A = Enter then goto -Bye
-Endit %A = select( color( yellow on blue), color( black on white ), Arrow)
if %A = Esc then goto -line0
if %R = 1 then goto -End1
-End2 if %R = 2 type " Go to on-line documentation" | If %A = Enter then stack "BATDOC" |exit
-End3 if %R = 3 type " Return to EBL Plus demo " | If %A = Enter then goto -top
goto -endit
-Bye window( 19, 14, 49, 21)
type "So long" %F....
type "P.S. For quickie help,"
type " just enter 'BAT' from DOS!"
exit
-start
if %D = 'RAM' then RAM
else BIOS
** Open the demo with welcome message windows in the shape of a big 'W' **
* play( o5 t140 ms l8 g4 p >c <b >c p6 <e p6 d p6 b p6 >c..)
* repeat with %0 = 1 to 27
* color ((%0 % 8) & "F")
* if %0 < 7 then %1 = %0 * 2
* else if %0 < 14 then %1 = (14 - %0) * 2
* else if %0 < 21 then %1 = (%0 - 13) * 2
* else %1 = (28 - %0) * 2
* window( (%0*2), %1, (%0*2+20), (%1+5), s)
* type
* type center("Welcome", 18)
* end repeat
* wait until time(2)
** Start by asking who I'm talking to **
colorchar '=' as color( yellow on white )
colorchar '@' as color( white on blue )
colorchar '`' as color( blink white on blue )
color( black on white )
cls
begtype
=(Non-IBM systems, read NOTE within this file)=
@┌───────────────────────────────────────────────────────────────────────┐@
@│ EXTENDED BATCH LANGUAGE-PLUS │@
@│ │@
@│ Welcome to the Extended Batch Language Plus Demonstration ! │@
@│ │@
@└───────────────────────────────────────────────────────────────────────┘@
end
call -asplogo 40 16
color( white on black )
locate 13 10 | Type "What is your first name? ;"
read %F
%7 = 27
%L =
%0 = left( (" " & %F & "'s EBL Plus Sampler Menu"), 47)
-top ** Show Master Menu of things that can be shown **
color( Normal )
colorchar
colorchar '@' as color( white on blue )
colorchar '^' as color( lgray on blue )
colorchar '#' as color( black on cyan )
colorchar '&' as color( yellow on red )
colorchar '*' as color( white on red )
cls begtype
@════════════════════════════════════════════════@ ^┌─────────────────────────┐^
@ \%0@ ^│ User supported software │^
@════════════════════════════════════════════════@ ^│ by │^
^│ │^
^│ Seaware Corp. │^
# C #────&I can Count & ^│ P.O. Box 1656 │^
* * ^│ Delray Beach, FL 33444 │^
# D #────&Directory of available programs & ^│ 407/392-2046 │^
* * ^│ │^
# F #────&Testing for Files & ^│ Order your registered │^
* * ^│ copy for $79 from us │^
# K #────&Keyboard stack (the invisible fingers)& ^│ directly or our order │^
* * ^│ line at 800/634-8188 │^
# S #────&Display Screen and String operations & ^│ │^
* * ^│ Please copy and share │^
# X #────&eXit & ^│ BAT.COM, BATDOC.BAT, │^
^│ and BATDEMO.BAT for │^
^│ non-commercial uses │^
^│ only. │^
^│ │^
^│ ASP member. │^
(Select a demo with the cursor and press ─┘) ^└─────────────────────────┘^
end
colorchar
colorchar '@' as color( white on blue )
-Entry
color( yellow on black)
%9 = ''
-Text.1 *** (C)ount
locate 1 18
type " This is a simple game that shows the math "
type " and looping capabilities of EBL Plus. "
if %9 = Enter then call -i.can.count | goto -top
-Choose
%7 = %7 + 3
%9 = select(color(yellow on red),color(black on white),Arrow)
if %9 = 'C' then %9 = Enter
if %9 = 'D' then %9 = Enter
if %9 = 'F' then %9 = Enter
if %9 = 'K' then %9 = Enter
if %9 = 'S' then %9 = Enter
if %9 = 'X' then %9 = Enter
locate 1 18
if %R = 1 then goto -Text.1
if %R <> 2 then skip 4
type " See how EBL Plus can work together with your "
type " application and DOS. "
if %9 = Enter then call -dgo | goto -top
else goto -Choose
if %R <> 3 then skip 4
type " EBL Plus can see files that are created by "
type " your programs, or create new ones on it own. "
if %9 = Enter then call -fgo | goto -top
else goto -Choose
if %R <> 4 then skip 4
type " EBL Plus can automatically control your "
type " applications by typing on the keyboard. "
if %9 = Enter then call -kgo | goto -top
else goto -Choose
if %R <> 5 then skip 4
type " See how EBL Plus makes your screen come alive"
type " with color and powerful string handling. "
if %9 = Enter then call -sgo | goto -top
else goto -Choose
else
type " Leave this Demo and return to DOS "
type " "
if %9 = Enter then goto -exit
else goto -Choose
*******************************************************************************
* number guessing demo *
-i.can.count
cls type "I am thinking of a two digit number, can you guess it?"
%J=tries
%7 = right(%7,2) + 0 |* Limit to just 2 digits!
repeat with %A = 4 down to 0
read %5
if %5 = %7
begin
type "Great! I was afraid you weren't going to get it!"
exit repeat
end
if %A = 1 then %J = try
if %A = 0
begin
type "BOO HISSS! The number was" %7 "!"
exit repeat
end
if %5 > %7 type "Try a little lower. You get" %A "more" %J.
if %5 < %7 type "Try a higher number. You get" %A "more" %J.
end repeat
begtype
@════════════════════════════════════════════════════════════════════════════@
A BAT program can create loops and count events. With this you can
sequence through file numbers, or create loops to do retries in case of
errors. The REPEAT commands are handy for this. EBL programs can even
do arithmetic (up to 18 digits) and string manipulation (up to 255
characters mixed case). In addition, the external function BATMATH3,
(or alternate BATMATH87 for use with the 8087 co-processor) is provided
to registered users when floating point math is needed.
@════════════════════════════════════════════════════════════════════════════@
Press any key to continue. . .
end
inkey
return
*******************************************************************************
* directory demo *
-dgo
color( White )
cls
type "Enter file.spec for files you would like to see,"
read or press ENTER for all: %1
if .%1 = '.' then %1 = '*.*'
-dirques
colorchar . as color( yellow on black )
type "Would you like a .S.tandard or .W.ide directory?"
select( color(yellow on black))
colorchar .